import { defineStore } from 'pinia'

export const useCommonStore = defineStore('common', {
  state: () => ({
    routeLoaded: false,
    firstRoute: null,
    menuTree: null,
    currentRoute: null,
  }),
  getters: {
  },
  actions: {
    setRouteLoaded(loaded){
      this.routeLoaded = loaded;
    },
    setFirstRoute(route) {
      this.firstRoute = route;
    },
    setMenuTree(data) {
      this.menuTree = data;
    },
    setCurrentRoute(route) {
      this.currentRoute = route;
    }
  },
})
